class Circle{
    draw () {
        console.log('画一个圆形')
    }
}
class Decorator{
    constructor(circle) {
        this.circle = new Circle
    }
    draw () {
        this.circle.draw()
        this.setRedBorder(circle)
    }
    setRedBorder (circle) {
        console.log(`设置红色边框`)        
    }
}
// 测试代码

let circle = new Circle()
circle.draw()

console.log(`----分割线----`)

let dec = new Decorator(circle)
dec.draw()
